package com.yc.meeting_attendance.utils;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by yczn-007 on 2016/12/20.
 */

public class ThreadUtil {
    private ExecutorService mExs;
    private static ThreadUtil mInstance=null;

    public static synchronized ThreadUtil getInstance(){
        if(null==mInstance){
            mInstance=new ThreadUtil();
        }
        return mInstance;
    }
    private ThreadUtil(){
        mExs = Executors.newFixedThreadPool(10);
    }
    public void submit(Runnable task){
        mExs.submit(task);
    }
    public void shudown(){
        mExs.shutdown();
    }

}
